<template>
  <a-card :bordered="false">
      <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="时间(月)">
              <a-range-picker
              :allowClear="false"
              v-model="date"
              format="YYYY-MM"
              style="width: 100%"
              @change="onDateChange"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="姓名">
              <j-input placeholder="请输入姓名" v-model="queryParam.employeeName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="所属公司">
              <j-input placeholder="请输入所属公司" v-model="queryParam.company"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="所属团队">
              <j-input placeholder="请输入所属团队" v-model="queryParam.team"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="工资条导入员">
              <select-user-by-dep
                  v-model="queryParam.handlerId" :multi="false"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset()" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <!-- <a-button @click="handleAdd" type="primary" icon="plus" :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:add')">新增</a-button> -->
      <a-button type="primary" icon="download" @click="handleExportXls('员工工资条数据')" :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:export')">导出</a-button>
      <!-- <a-button  @click='()=>{this.flag=true}' type="primary" icon="import" :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:import')">导入工资条</a-button> -->
      <!-- <a-button @click="handleAdd" type="primary" icon="redo" :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:add')">工资条自动匹配员工</a-button> -->
      <!-- <a-popconfirm :title="selectedRowKeys.length>0?'确定通知这'+selectedRowKeys.length+'位员工吗?未匹配的员工无法通知到~':'确定通知所有员工吗？未匹配的员工无法通知到~'" v-if="dataSource.length>0" @confirm="() => handleNotice()">
        <a-button type="primary" icon="notification" :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:notification')">工资条通知</a-button>
      </a-popconfirm> -->
      
      <a-modal v-model="flag" title="导入工资条" @cancel="()=>{model.date=null}">
        <a-row :gutter="24">
          <a-col>
            <a-form-item label="导入的工资条月份">
              <a-month-picker placeholder="请选择月份" style="width: 100%" v-model="model.date" @change="onChange"/>
            </a-form-item>
          </a-col>
          <a-col>
            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :data="{'date':this.model.date}" :action="importExcelUrl" @change="handleImportExcel">
              <a-button type="primary" :disabled="model.date==null" icon="import" >导入工资条</a-button>
            </a-upload>
          </a-col>
          <a-col>
            推荐使用导出模板，没有导出模板？<a @click="download">点击下载工资条导出模板</a>
          </a-col>
        </a-row>
        <template slot="footer">
         <a-button @click.stop="()=>{flag=false,model.date=null}">关闭</a-button>
        </template>
      </a-modal>

      <!-- 高级查询区域 -->
      <!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
      <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel" :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:delete')"><a-icon type="delete"/>删除</a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
      </a-dropdown> -->
      <a-popover title="自定义列" trigger="click" placement="leftBottom">
        <template slot="content">
          <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
            <a-row>
              <template v-for="(item,index) in defColumns">
                <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
                  <a-col :span="12"><a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox></a-col>
                </template>
              </template>
            </a-row>
          </a-checkbox-group>
        </template>
        <a style="float: right;"><a-icon type="setting" :style='iconStyle'/></a>
      </a-popover>
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>

      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        :components="draggableComponent"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        :customRow="customRow"
        @change="handleTableChange">
        <template slot="accumulatedIncome">
          <span>{{ date[0].substr(0,4) }}年累计收入</span>
        </template>
        <template slot="insuranceDeduction">
          <span>{{ date[0].substr(0,4) }}年五险一金累计扣款</span>
        </template>

        <template slot="personalIncomeTax">
          <span>{{ date[0].substr(0,4) }}年累计个税专项附加扣除金额</span>
        </template>
        <template slot="payableInAdvance">
          <span>{{ date[0].substr(0,4) }}年应预缴个人所得税</span>
        </template>
        <template slot="individualIncomeTaxAmount">
          <span>{{ date[0].substr(0,4) }}年已预缴个人所得税金额</span>
        </template>

        <template slot="isMate" slot-scope="isMate">
           <a-badge :status="isMate | statusTypeFilter" :text="isMate | statusFilter"/>
        </template>
        <template slot="isDistribute" slot-scope="isDistribute">
           <a-badge :status="isDistribute | statusTypeFilter" :text="isDistribute | statusFilter"/>
        </template>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record">
            <a-button
                class="ruleButton"
                :ghost="true"
                type="primary"
                icon="edit"
                @click="handleEdit(record)"
                :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:edit')"
        />
        <a-divider type="vertical"/>
        <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a-button
                    class="ruleButton"
                    :ghost="true"
                    type="primary"
                    icon="delete"
                    :disabled="isDisabledAuth('erpHrSalaryPayslipRecord:delete')"/>
        </a-popconfirm>
        </span>

      </a-table>
    </div>

    <erp-hr-salary-payslip-record-modal ref="modalForm" @ok="modalFormOk"></erp-hr-salary-payslip-record-modal>
  </a-card>
</template>

<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import ErpHrSalaryPayslipRecordModal from './modules/ErpHrSalaryPayslipRecordModal'
  import {DisabledAuthFilterMixin} from '@/mixins/DisabledAuthFilterMixin'
  import moment from 'moment'
  import { deleteAction, downFile, getAction, getFileAccessHttpUrl } from '@/api/manage'
  import SelectUserByDep from '@/views/scy/components/SelectUserByDep'
  import { filterMultiDictText, initDictOptions } from '@/components/dict/JDictSelectUtil'

  export default {
    name: 'ErpHrSalaryPayslipRecordList',
    mixins:[JeecgListMixin, mixinDevice, DisabledAuthFilterMixin],
    components: {
      ErpHrSalaryPayslipRecordModal,
      SelectUserByDep
    },
    data () {
      return {
        date:[moment(new Date()).subtract(1,'months').format("YYYY-MM"),moment(new Date()).format("YYYY-MM")],
        queryParam:{
          date_begin:moment(new Date()).subtract(1,'months').format('YYYY-MM'),
          date_end:moment(new Date()).format('YYYY-MM')
        },
        model:{},
        flag:false,
        description: '员工工资条数据管理页面',
        //表头
        columns:[],
        //列设置
        settingColumns:[],
        // 列定义
        defColumns: [
          {
            title: '序号',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'工资条导入员',
            align:"center",
            width:100,
            dataIndex: 'createBy_dictText',
          },
          {
            title:'工资条导入时间',
            align:"center",
            width:100,
            dataIndex: 'createTime',
          },
          {
            title:'工资期间',
            align:"center",
            width:100,
            dataIndex: 'salaryDate',
          },
          {
            title:'工号',
            align:"center",
            width:100,
            dataIndex: 'employeeNo',
          },
          {
            title:'姓名',
            align:"center",
            width:100,
            dataIndex: 'employeeName',
          },
          {
            title:'人员状态',
            align:"center",
            width:100,
            dataIndex: 'employeeStatus',
          },
          {
            title:'身份证号码',
            align:"center",
            width:200,
            dataIndex: 'idCardNo',
          },
          {
            title:'所属公司',
            align:"center",
            width:100,
            dataIndex: 'company',
          },
          {
            title:'所属团队',
            align:"center",
            width:100,
            dataIndex: 'team',
          },
          {
            title:'所属团队部门',
            align:"center",
            width:150,
            dataIndex: 'depart',
          },
          {
            title:'所属团队岗位',
            align:"center",
            width:150,
            dataIndex: 'post',
          },
          {
            title:'入职时间',
            align:"center",
            dataIndex: 'joinDate',
          },
          {
            title:'转正时间',
            align:"center",
            width:100,
            dataIndex: 'probationDate',
          },
          // {
          //   title:'最后一次岗位变化引起的薪级调整日期',
          //   align:"center",
          //   dataIndex: 'lastDate',
          // },
          {
            title:'最后工作日',
            align:"center",
            width:100,
            dataIndex: 'lastWorkDate',
          },
          {
            title:'薪级',
            align:"center",
            width:60,
            dataIndex: 'salaryScale',
          },
          // {
          //   title:'基础工资',
          //   align:"center",
          //   dataIndex: 'basicSalary',
          // },
          // {
          //   title:'年功工资',
          //   align:"center",
          //   dataIndex: 'seniorityWage',
          // },
          // {
          //   title:'等级工资',
          //   align:"center",
          //   dataIndex: 'gradedWages',
          // },
          {
            title:'岗位工资',
            align:"center",
            width:100,
            dataIndex: 'postWages',
          },
          {
            title:'加1项',
            align:"center",
            width:100,
            dataIndex: 'addItem',
          },
          {
            title:'预发绩效',
            align:"center",
            width:100,
            dataIndex: 'preReleasePerformance',
          },
          
          {
            title:'预发绩效补发',
            align:"center",
            width:100,
            dataIndex: 'preReleasePerformanceReissue',
          },
          {
            title:'工龄工资',
            align:"center",
            width:100,
            dataIndex: 'seniorityWages',
          },
          {
            title:'执业金',
            align:"center",
            width:100,
            dataIndex: 'practicingFee',
          },
          {
            title:'报告审核费',
            align:"center",
            width:100,
            dataIndex: 'reportReviewFee',
          },
          {
            title:'项目绩效',
            align:"center",
            width:100,
            dataIndex: 'projectPerformance',
          },
          {
            title:'效能工资',
            align:"center",
            width:100,
            dataIndex: 'efficiencySalary',
          },
          {
            title:'餐补',
            align:"center",
            width:100,
            dataIndex: 'mealAllowance',
          },
          {
            title:'住房补贴',
            align:"center",
            width:100,
            dataIndex: 'housingSubsidies',
          },
          {
            title:'通讯补贴',
            align:"center",
            width:100,
            dataIndex: 'communicationSubsidy',
          },
          {
            title:'外派补贴',
            align:"center",
            width:100,
            dataIndex: 'expatriateSubsidy',
          },
          {
            title:'专项支持费',
            align:"center",
            width:100,
            dataIndex: 'specialSupportFee',
          },
          {
            title:'公里数提现',
            align:"center",
            width:100,
            dataIndex: 'kilometersWithdrawal',
          },
          {
            title:'应收账款奖励',
            align:"center",
            width:150,
            dataIndex: 'accountsReceivableRewards',
          },
          {
            title:'宣传奖励',
            align:"center",
            width:100,
            dataIndex: 'promotionRewards',
          },
          {
            title:'其他奖励',
            align:"center",
            width:100,
            dataIndex: 'otherRewards',
          },
          {
            title:'前期已结算',
            align:"center",
            width:100,
            dataIndex: 'previouslySettled',
          },
          {
            title:'加班工资',
            align:"center",
            width:100,
            dataIndex: 'overtimeWage',
          },
          {
            title:'其他加项',
            align:"center",
            width:100,
            dataIndex: 'otherAdditions',
          },
          // {
          //   title:'试用期天数',
          //   align:"center",
          //   dataIndex: 'probationPeriodDays',
          // },
          {
            title:'试用期薪级工资扣款',
            align:"center",
            width:200,
            dataIndex: 'salaryLevelDuringProbationaryAmount',
          },
          // {
          //   title:'入离职缺勤天数',
          //   align:"center",
          //   dataIndex: 'resignationDays',
          // },
          // {
          //   title:'入离职缺勤扣款',
          //   align:"center",
          //   dataIndex: 'resignationAmount',
          // },
          // {
          //   title:'事假天数',
          //   align:"center",
          //   dataIndex: 'leaveDays',
          // },
          // {
          //   title:'事假扣款',
          //   align:"center",
          //   dataIndex: 'personalLeaveAmount',
          // },
          // {
          //   title:'病假天数',
          //   align:"center",
          //   dataIndex: 'sickLeaveDays',
          // },
          // {
          //   title:'病假扣款',
          //   align:"center",
          //   dataIndex: 'sickLeaveAmount',
          // },
          // {
          //   title:'产假天数',
          //   align:"center",
          //   dataIndex: 'maternityLeaveDays',
          // },
          // {
          //   title:'产假扣款',
          //   align:"center",
          //   dataIndex: 'maternityLeaveAmount',
          // },
          // {
          //   title:'迟到早退次数',
          //   align:"center",
          //   dataIndex: 'lateAndEarlyLeaveTime',
          // },
          // {
          //   title:'迟到早退扣款',
          //   align:"center",
          //   dataIndex: 'lateAndEarlyLeaveAmount',
          // },
          // {
          //   title:'缺卡次数',
          //   align:"center",
          //   dataIndex: 'missCardTime',
          // },
          // {
          //   title:'缺卡扣款',
          //   align:"center",
          //   dataIndex: 'missCardAmount',
          // },
          // {
          //   title:'旷工天数',
          //   align:"center",
          //   dataIndex: 'absenteeismDays',
          // },
          // {
          //   title:'旷工扣款',
          //   align:"center",
          //   dataIndex: 'absenteeismAmount',
          // },
          {
            title:'缺勤扣款',
            align:"center",
            width:100,
            dataIndex: 'absenceDeduction',
          },
          {
            title:'应收账款扣款',
            align:"center",
            width:100,
            dataIndex: 'receivableDeduction',
          },
          {
            title:'其他扣款',
            align:"center",
            width:100,
            dataIndex: 'otherAmount',
          },
          {
            title:'应发工资',
            align:"center",
            width:100,
            dataIndex: 'wagepayable',
          },
          // {
          //   align:"center",
          //   dataIndex: 'accumulatedIncome',
          //   scopedSlots: { title:'accumulatedIncome' }
          // },
          {
            title:'个人社保',
            align:"center",
            width:100,
            dataIndex: 'nextMonthSocialAmount',
          },
          {
            title:'个人公积金',
            align:"center",
            width:100,
            dataIndex: 'providentFundAmount',
          },
          // {
          //   align:"center",
          //   dataIndex: 'insuranceDeduction',
          //   scopedSlots: { title:'insuranceDeduction' }
          // },
          // {
          //   align:"center",
          //   dataIndex: 'personalIncomeTax',
          //   scopedSlots: { title:'personalIncomeTax' }
          // },
          // {
          //   align:"center",
          //   dataIndex: 'payableInAdvance',
          //   scopedSlots: { title:'payableInAdvance' }
          // },
          // {
          //   align:"center",
          //   dataIndex: 'individualIncomeTaxAmount',
          //   scopedSlots: { title:'individualIncomeTaxAmount' }
          // },
          {
            title:'本期应预缴个人所得税',
            align:"center",
            width:200,
            dataIndex: 'incomeTaxPayableInAdvance',
          },
          {
            title:'前期已发放',
            align:"center",
            width:100,
            dataIndex: 'previouslyDistributed',
          },
          {
            title:'实发工资',
            align:"center",
            width:100,
            dataIndex: 'netSalary',
          },
          {
            title: '匹配状态',
            align: 'center',
            dataIndex: 'isMate_dictText',
            scopedSlots: { customRender: 'isMate' },
            // fixed: 'right',
            width: 100,
            filterMultiple: false,
            filters: [
              {
                text: '未匹配',
                value: 0,
              }, {
                text: '已匹配',
                value: 1,
              }],
          },
          {
            title: '通知状态',
            align: 'center',
            dataIndex: 'isDistribute_dictText',
            scopedSlots: { customRender: 'isDistribute' },
            fixed: 'right',
            width: 100,
            filterMultiple: false,
            filters: [
              {
                text: '未通知',
                value: 0,
              }, {
                text: '已通知',
                value: 1,
              }],
          },
          // {
          //   title: '操作',
          //   dataIndex: 'action',
          //   align:"center",
          //   fixed:"right",
          //   width:100,
          //   scopedSlots: {
          //   filterDropdown: 'filterDropdown',
          //   filterIcon: 'filterIcon',
          //   customRender: 'action' }
          // }
        ],
        url: {
          staticUrl:"api/erpmng/sys/common/static/temp/",
          notice: "/api/erp/hr/salary/erpHrSalaryPayslipRecord/notice",
          list: "/api/erp/hr/salary/erpHrSalaryPayslipRecord/allList",
          delete: "/api/erp/hr/salary/erpHrSalaryPayslipRecord/delete",
          deleteBatch: "/api/erp/hr/salary/erpHrSalaryPayslipRecord/deleteBatch",
          exportXlsUrl: "/api/erp/hr/salary/erpHrSalaryPayslipRecord/exportAllXls",
          importExcelUrl: "api/erp/hr/salary/erpHrSalaryPayslipRecord/importExcel",
        },
        dictOptions:{},
        superFieldList:[],
      }
    },
    created() {
      this.getSuperFieldList();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
      searchReset() {
        this.queryParam = {}
        this.$set(this.queryParam,"date_begin",moment(new Date()).subtract(1,'months').format("YYYY-MM"))
        this.$set(this.queryParam,"date_end",moment(new Date()).format("YYYY-MM"))
        this.date=[moment(new Date()).subtract(1,'months').format("YYYY-MM"),moment(new Date()).format("YYYY-MM")];
        this.selectedRowKeys=[]
        this.loadData(1)
      },
      handleNotice(){
        let param = this.getQueryParams()
        if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
          param['selections'] = this.selectedRowKeys.join(',')
        }
        getAction(this.url.notice,param).then((res)=>{
          if(res.success){
            this.$message.success(res.message);
            this.loadData(1);
            this.selectedRowKeys=[]
          }
        })
      },
      download() {
        initDictOptions('hr_salary_download').then((res) => {
          if (res.success) {
            let data = res.result
            location.href = `${window._CONFIG['domianURL']}/${this.url.staticUrl}`+data[0].value
          }
        })
      },
      handleExportXls() {
      let fileName = "员工工资条数据-"+this.queryParam.date_begin+"~"+this.queryParam.date_end;
      let param = this.getQueryParams()
      if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
        param['selections'] = this.selectedRowKeys.join(',')
      }
      downFile(this.url.exportXlsUrl, param).then(data => {
        if (!data) {
          this.$message.warning('文件下载失败')
          return
        }
        if (typeof window.navigator.msSaveBlob !== 'undefined') {
          window.navigator.msSaveBlob(
            new Blob([data], {
              type: 'application/vnd.ms-excel'
            }),
            fileName + '.xls'
          )
        } else {
          let url = window.URL.createObjectURL(
            new Blob([data], {
              type: 'application/vnd.ms-excel'
            })
          )
          let link = document.createElement('a')
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', fileName + '.xlsx')
          document.body.appendChild(link)
          link.click()
          document.body.removeChild(link) // 下载完成移除元素
          window.URL.revokeObjectURL(url) // 释放掉blob对象
        }
      })
    },
      /* 导入 */
    handleImportExcel(info) {
      if (info.file.status !== 'uploading') {
        console.log(info.file, info.fileList)
      }
      if (info.file.status === 'done') {
        if (info.file.response.success) {
          // this.$message.success(`${info.file.name} 文件上传成功`);
          if (info.file.response.code === 201) {
            let {
              message,
              result: { msg, fileUrl, fileName }
            } = info.file.response
            let href = window._CONFIG['domianURL'] + fileUrl
            this.$warning({
              title: message,
              content: (
                <div>
                  <span> {msg} </span>
                  <br/>
                  <span>
                    {' '}
                    具体详情请{' '}
                    <a href={href} target="_blank" download={fileName}>
                      {' '}
                      点击下载{' '}
                    </a>{' '}
                  </span>
                </div>
              )
            })
          } else {
            this.$message.success(info.file.response.result || `${info.file.name} 文件上传成功`)
          }
          this.loadData()
          this.flag=false;
          this.model.date=null;
        } else {
          this.$message.error(`${info.file.name} ${info.file.response.message}`)
        }
      } else if (info.file.status === 'error') {
        if (info.file.response.status === 500) {
          let data = info.file.response
          const token = Vue.ls.get(ACCESS_TOKEN)
          if (token && data.message.includes('Token失效')) {
            Modal.error({
              title: '登录已过期',
              content: '很抱歉，登录已过期，请重新登录',
              okText: '重新登录',
              mask: false,
              onOk: () => {
                store.dispatch('Logout').then(() => {
                  Vue.ls.remove(ACCESS_TOKEN)
                  window.location.reload()
                })
              }
            })
          }
        } else {
          this.$message.error(`文件上传失败: ${info.file.msg} `)
        }
      }
    },
      onChange(date, dateString) {
        this.$set(this.model,"date",dateString)
      },
      onDateChange(date, dateString) {
        this.$set(this.queryParam,"date_begin",moment(dateString[0]).format('YYYY-MM'))
        this.$set(this.queryParam,"date_end",moment(dateString[1]).format('YYYY-MM'))
        this.date=[moment(dateString[0]).format('YYYY-MM'),moment(dateString[1]).format('YYYY-MM')]
      },
      initDictConfig(){
      },
      handleDetail: function (record) {
        this.$refs.modalForm.edit(record);
        this.$refs.modalForm.title = '详情';
        this.$refs.modalForm.disableSubmit = true;
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'string',value:'salaryDate',text:'工资期间',dictCode:''})
        fieldList.push({type:'string',value:'employeeNo',text:'工号',dictCode:''})
        fieldList.push({type:'string',value:'employeeName',text:'姓名',dictCode:''})
        fieldList.push({type:'string',value:'employeeStatus',text:'人员状态',dictCode:''})
        fieldList.push({type:'string',value:'idCardNo',text:'身份证号码',dictCode:''})
        fieldList.push({type:'string',value:'company',text:'所属公司',dictCode:''})
        fieldList.push({type:'string',value:'team',text:'所属团队',dictCode:''})
        fieldList.push({type:'string',value:'depart',text:'所属团队部门',dictCode:''})
        fieldList.push({type:'string',value:'post',text:'所属团队岗位',dictCode:''})
        fieldList.push({type:'string',value:'joinDate',text:'入职时间',dictCode:''})
        fieldList.push({type:'string',value:'probationDate',text:'转正时间',dictCode:''})
        fieldList.push({type:'string',value:'lastDate',text:'最后一次岗位变化引起的薪级调整日期',dictCode:''})
        fieldList.push({type:'string',value:'lastWorkDate',text:'最后工作日',dictCode:''})
        fieldList.push({type:'string',value:'salaryScale',text:'薪级',dictCode:''})
        fieldList.push({type:'string',value:'basicSalary',text:'基础工资',dictCode:''})
        fieldList.push({type:'string',value:'seniorityWage',text:'年功工资',dictCode:''})
        fieldList.push({type:'string',value:'gradedWages',text:'等级工资',dictCode:''})
        fieldList.push({type:'string',value:'preReleasePerformance',text:'预发绩效',dictCode:''})
        fieldList.push({type:'string',value:'addItem',text:'加1项',dictCode:''})
        fieldList.push({type:'string',value:'preReleasePerformanceReissue',text:'预发绩效补发',dictCode:''})
        fieldList.push({type:'string',value:'practicingFee',text:'执业金',dictCode:''})
        fieldList.push({type:'string',value:'reportReviewFee',text:'报告审核费',dictCode:''})
        fieldList.push({type:'string',value:'projectPerformance',text:'项目绩效',dictCode:''})
        fieldList.push({type:'string',value:'efficiencySalary',text:'效能工资',dictCode:''})
        fieldList.push({type:'string',value:'mealAllowance',text:'餐补',dictCode:''})
        fieldList.push({type:'string',value:'housingSubsidies',text:'住房补贴',dictCode:''})
        fieldList.push({type:'string',value:'communicationSubsidy',text:'通讯补贴',dictCode:''})
        fieldList.push({type:'string',value:'expatriateSubsidy',text:'外派补贴',dictCode:''})
        fieldList.push({type:'string',value:'specialSupportFee',text:'专项支持费',dictCode:''})
        fieldList.push({type:'string',value:'kilometersWithdrawal',text:'公里数提现',dictCode:''})
        fieldList.push({type:'string',value:'accountsReceivableRewards',text:'应收账款奖励',dictCode:''})
        fieldList.push({type:'string',value:'promotionRewards',text:'宣传奖励',dictCode:''})
        fieldList.push({type:'string',value:'otherRewards',text:'其他奖励',dictCode:''})
        fieldList.push({type:'string',value:'previouslySettled',text:'前期已结算',dictCode:''})
        fieldList.push({type:'string',value:'overtimeWage',text:'加班工资',dictCode:''})
        fieldList.push({type:'string',value:'otherAdditions',text:'其他加项',dictCode:''})
        fieldList.push({type:'string',value:'probationPeriodDays',text:'试用期天数',dictCode:''})
        fieldList.push({type:'string',value:'salaryLevelDuringProbationaryAmount',text:'试用期薪级工资扣款',dictCode:''})
        fieldList.push({type:'string',value:'resignationDays',text:'入离职缺勤天数',dictCode:''})
        fieldList.push({type:'string',value:'leaveDays',text:'事假天数',dictCode:''})
        fieldList.push({type:'string',value:'personalLeaveAmount',text:'事假扣款',dictCode:''})
        fieldList.push({type:'string',value:'sickLeaveDays',text:'病假天数',dictCode:''})
        fieldList.push({type:'string',value:'sickLeaveAmount',text:'病假扣款',dictCode:''})
        fieldList.push({type:'string',value:'maternityLeaveDays',text:'产假天数',dictCode:''})
        fieldList.push({type:'string',value:'maternityLeaveAmount',text:'产假扣款',dictCode:''})
        fieldList.push({type:'string',value:'lateAndEarlyLeaveTime',text:'迟到早退次数',dictCode:''})
        fieldList.push({type:'string',value:'lateAndEarlyLeaveAmount',text:'迟到早退扣款',dictCode:''})
        fieldList.push({type:'string',value:'missCardTime',text:'缺卡次数',dictCode:''})
        fieldList.push({type:'string',value:'missCardAmount',text:'缺卡扣款',dictCode:''})
        fieldList.push({type:'string',value:'absenteeismDays',text:'旷工天数',dictCode:''})
        fieldList.push({type:'string',value:'absenteeismAmount',text:'旷工扣款',dictCode:''})
        fieldList.push({type:'string',value:'receivableDeduction',text:'应收账款扣款',dictCode:''})
        fieldList.push({type:'string',value:'otherAmount',text:'其他扣款',dictCode:''})
        fieldList.push({type:'string',value:'wagepayable',text:'应发工资',dictCode:''})
        fieldList.push({type:'string',value:'accumulatedIncome',text:'累计收入',dictCode:''})
        fieldList.push({type:'string',value:'nextMonthSocialAmount',text:'下月个人社保',dictCode:''})
        fieldList.push({type:'string',value:'providentFundAmount',text:'当月个人公积金',dictCode:''})
        fieldList.push({type:'string',value:'insuranceDeduction',text:'五险一金累计扣款',dictCode:''})
        fieldList.push({type:'string',value:'personalIncomeTax',text:'累计个税专项附加扣除金额',dictCode:''})
        fieldList.push({type:'string',value:'payableInAdvance',text:'应预缴个人所得税',dictCode:''})
        fieldList.push({type:'string',value:'individualIncomeTaxAmount',text:'已预缴个人所得税金额',dictCode:''})
        fieldList.push({type:'string',value:'incomeTaxPayableInAdvance',text:'本期应预缴个人所得税',dictCode:''})
        fieldList.push({type:'string',value:'previouslyDistributed',text:'前期已发放',dictCode:''})
        fieldList.push({type:'string',value:'netSalary',text:'实发工资',dictCode:''})
        this.superFieldList = fieldList
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>
